package com.nebula.upms.service.support.datasource;


import com.nebula.common.datasource.MultipleDataSource;
import com.nebula.upms.service.support.constant.Constant;

/**
 * Created by Mtime on 2017/3/31.
 */
public class UpmsDs extends MultipleDataSource {

    private UpmsDs() {}
    private static volatile UpmsDs instance;
    public static UpmsDs instance() {
        if (instance == null) {
            synchronized (UpmsDs.class) {
                if (instance == null) {
                    instance = new UpmsDs();
                }
            }
        }
        return instance;
    }
    public   void initDefaultDs() {
        setDefaultMysqlName(Constant.MYSQL_MAIN);
        setDefaultRedisName(Constant.REDIS_MAIN);
    }
}
